/*
 * create by straysnail
 * 2022/2/26
 */

#define buzPin  A3  //定义蜂鸣器的引脚

void setup() {
  // put your setup code here, to run once:
  pinMode(buzPin, OUTPUT); //设置为输出状态
}

void loop() {
  //通过延时来设置蜂鸣器的频率
  digitalWrite(buzPin, HIGH);
  delayMicroseconds(500);  //延时微秒,一定范围内，调延时大小，蜂鸣器会响不同的声音
  digitalWrite(buzPin, LOW);
  delayMicroseconds(500);
}
